<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品详情 - 我的电商网站</title>
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <header>
        <nav>
            <div class="logo">电商平台</div>
            <ul>
                <li><a href="/">首页</a></li>
                <li><a href="/products">商品</a></li>
                <li><a href="/cart">购物车</a></li>
                <li><a href="/profile">个人资料</a></li>
            </ul>
        </nav>
    </header>

    <main>
        <section class="product-detail">
            <div class="product-images">
                <div class="main-image">
                    <img id="mainProductImage" src="" alt="商品主图">
                </div>
                <div class="thumbnail-images">
                    <!-- 缩略图将通过JavaScript动态加载 -->
                </div>
            </div>
            
            <div class="product-info">
                <h1 id="productTitle"></h1>
                <div class="price" id="productPrice"></div>
                <div class="rating">
                    <span class="stars">★★★★★</span>
                    <span class="review-count" id="reviewCount"></span>
                </div>
                <div class="description" id="productDescription"></div>
                
                <div class="product-actions">
                    <div class="quantity">
                        <button class="qty-btn minus">-</button>
                        <input type="number" value="1" min="1">
                        <button class="qty-btn plus">+</button>
                    </div>
                    <button class="btn add-to-cart">加入购物车</button>
                    <button class="btn buy-now">立即购买</button>
                </div>
                
                <div class="product-meta">
                    <div>库存: <span id="stock"></span></div>
                    <div>分类: <span id="category"></span></div>
                    <div>品牌: <span id="brand"></span></div>
                </div>
            </div>
        </section>
        
        <section class="product-tabs">
            <div class="tabs">
                <button class="tab-btn active" data-tab="description">商品描述</button>
                <button class="tab-btn" data-tab="specs">规格参数</button>
                <button class="tab-btn" data-tab="reviews">用户评价</button>
            </div>
            
            <div class="tab-content">
                <div id="description" class="tab-pane active">
                    <!-- 商品详细描述将通过JavaScript加载 -->
                </div>
                <div id="specs" class="tab-pane">
                    <!-- 规格参数将通过JavaScript加载 -->
                </div>
                <div id="reviews" class="tab-pane">
                    <!-- 用户评价将通过JavaScript加载 -->
                </div>
            </div>
        </section>
    </main>

    <!-- <footer>
        <p>&copy; 2023 电商平台. 保留所有权利.</p>
    </footer> -->

    <script src="/static/js/product_detail.js"></script>
</body>
</html>